//
//  ViewController.m
//  ModelJsonDemo
//
//  Created by苏沫离 on 2018/3/21.
//  Copyright © 2018年 longlong. All rights reserved.
//

#import "ViewController.h"
#import "PeopleModel.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)switchModelClick:(UIButton *)sender
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"PeopleData" ofType:@"geojson"];
    NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfFile:path] options:NSJSONReadingMutableContainers error:nil];
    PeopleModel *model = [PeopleModel modelWithParserDict:dict];
    NSLog(@"model -------- %@",model);
}

@end
